HipArsd_TTF_Font

Check the unicode table: https://unicode-table.com/en/blocks/ There is a lot of character ranges that defines a set of characters in a language, such as: 0000—007F Basic Latin 0080—00FF Latin-1 Supplement 0100—017F Latin Extended-A 0180—024F Latin Extended-B Maybe it will prove more useful than having a default charset

Constructors

this
this(string path, uint fontSize)
Undocumented in source.

Members

Functions

generateImage
ubyte[] generateImage(int size, uint width, uint height, dstring charset)

I'm no good packer. The image will be at least 2048xMinPowOf2

getFontWithSize
HipFont getFontWithSize(uint size)

This function returns a new font using the same data file, with a new size. The font data will reference to this same one

getKerning
int getKerning(const(HipFontChar)* current, const(HipFontChar)* next)
Undocumented in source. Be warned that the author may not have intended to support it.
getKerning
int getKerning(dchar current, dchar next)
Undocumented in source. Be warned that the author may not have intended to support it.
loadFromMemory
bool loadFromMemory(ubyte[] data)

This will cause a full load of the .ttf file, image generation and GPU upload. Should only be used If you don't care about async

loadTexture
bool loadTexture(ubyte[] rawImage)
Undocumented in source. Be warned that the author may not have intended to support it.
partialLoad
bool partialLoad(ubyte[] data, ubyte[] rawImage)
Undocumented in source. Be warned that the author may not have intended to support it.
renderCharacter
RenderizedChar renderCharacter(dchar ch, int size, float shift_x, float shift_y)
_textureHeight
uint _textureHeight;
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_textureWidth
uint _textureWidth;
Undocumented in source.
clones
Hip_TTF_Font[] clones;
Undocumented in source.
font
TtfFont font;
Undocumented in source.
fontScale
float fontScale;
Undocumented in source.
fontSize
uint fontSize;
Undocumented in source.
mainInstance
Hip_TTF_Font mainInstance;
Undocumented in source.
path
string path;
Undocumented in source.

Inherited Members

From HipFont

getKerning
int getKerning(dchar current, dchar next)
Undocumented in source.
getKerning
int getKerning(const(HipFontChar)* current, const(HipFontChar)* next)
Undocumented in source.
_texture
IHipTexture _texture;

Underlying GPU texture

_characters
HipFontChar[dchar] _characters;
Undocumented in source.
_spaceWidth
uint _spaceWidth;

Saves the space width for the bitmap text process the ' '. If the original spaceWidth is == 0, it won't draw a quad

_lineBreakHeight
uint _lineBreakHeight;

How much the line break will offset in Y the next char

characters
HipFontChar[dchar] characters()

////Properties///////

characters
const(HipFontChar[dchar]) characters()
Undocumented in source. Be warned that the author may not have intended to support it.
texture
IHipTexture texture()
Undocumented in source. Be warned that the author may not have intended to support it.
spaceWidth
uint spaceWidth()
Undocumented in source. Be warned that the author may not have intended to support it.
spaceWidth
uint spaceWidth(uint newWidth)
Undocumented in source. Be warned that the author may not have intended to support it.
lineBreakHeight
uint lineBreakHeight()
Undocumented in source. Be warned that the author may not have intended to support it.
lineBreakHeight
uint lineBreakHeight(uint newHeight)
Undocumented in source. Be warned that the author may not have intended to support it.
wordWrapRange
HipWordWrapRange wordWrapRange(dstring text, int maxWidth)
Undocumented in source. Be warned that the author may not have intended to support it.
calculateTextBounds
void calculateTextBounds(dstring text, uint[] linesWidths, int biggestWidth, int height, int maxWidth)
Undocumented in source. Be warned that the author may not have intended to support it.
getFontWithSize
HipFont getFontWithSize(uint size)
Undocumented in source.

Meta